package org.example.springboot.vo;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.example.springboot.common.utils.DateUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Fz
 * @since 1.0.0 2024-07-31
 */
@Data
@Schema(description = "灌溉单元基本信息展示层")
public class IrrigationUnitVO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "单元编号")
    private String unitCode;

    @Schema(description = "控制设备名称")
    private String controlDevice;

    @Schema(description = "控制设备ID")
    private String controlDeviceId;

    @Schema(description = "单元面积")
    private Float area;

    @Schema(description = "轮灌编号")
    private String sym;

    @Schema(description = "作物名称")
    private String title;

    @Schema(description = "灌溉方式 01 定量灌溉 01 周日灌溉 02 水分控制灌溉  03 ET决策灌溉")
    private String type;

    @Schema(description = "定量灌溉方式 JSON格式")
    private JSONObject rationTypeMsg;

    @Schema(description = "周期灌溉方式 JSON格式")
    private JSONObject cycleTypeMsg;

    @Schema(description = "水分灌溉方式 JSON格式")
    private JSONObject moistureControlTypeMsg;

    @Schema(description = "ET灌溉方式 JSON格式")
    private JSONObject ETTypeMsg;

    @Schema(description = "灌溉状态 1启动 0停止")
    private String status;


    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createDate;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date updateDate;

    @Schema(description = "uuid")
    private String uuid;

    @Schema(description = "土壤水分")
    private String soilMoisture;

    @Schema(description = "剩余流量")
    private Float flowRemaining;

    @Schema(description = "蒸散发量")
    private Float evapotranspiration;

    @Schema(description = "剩余时间")
    private String timeRemaining;

    private String unit;




}